<template>
<div class="home">
   <div class="menu">
     <div><router-link to="/manage/info">用户管理</router-link>   </div>
     <div @click="toFee">缴费</div>
     <div @click="toNews">公告</div>

     <div @click="out">退出登录</div>
   </div>
   <div class="main">  <router-view></router-view></div>
</div>
</template>
<script setup lang='ts'> 
 import {useRouter} from 'vue-router';
 const router = useRouter();

const toFee = () => {
//   router.push('/manage/fee')
       router.push({path:'/manage/fee',query:{id:100,type:"news"}}); //query传参
}
const toNews = () => {
  router.push('/manage/news')
}
const out=()=>{
    sessionStorage.clear();
    // sessionStorage.removeItem('token');
    router.push('/login');
}
</script>
<style scoped lang='less'>
.home{
    width: 100%;
    min-height: 100vh;
    display: flex;
    .menu{
        width: 100px;
        background: skyblue;
        display: flex;
        flex-direction: column;
    }
    .main{
            

        flex: 1;
        background: red;
    }
    
}
</style>